<template>
  <div class="container">
      
<div :id="ids" :style="{width: '10vw', height: '20vh'}" style=" flex-grow:1; margin:20px 3vw 3vw;background:#fff;border:1px solid red"></div>

  </div>
</template>

<script>

export default {
  props:['ids','obj'],
  mounted(){
    this.drawLine();
  },
  methods: {
    drawLine(){
        // 基于准备好的dom，初始化echarts实例
        let myChart = this.$echarts.init(document.getElementById(this.ids))
        // 绘制图表
        myChart.setOption(this.obj);
    }
  }
}
</script>

<style scoped>

</style>
